<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<head>
<title>
listadoGrupo
</title>
<link href="css/estilos.css" rel="stylesheet" type="text/css">
</head>
<script type="" language="javascript">
  function eliminarGrupo(bool_del){
    if(bool_del==1){
      if( confirm("Desea eliminar este registro ") ){
        return true;
      }
      return false;
    }else{
      alert("No se puede eliminar este registro");
      return false;
    }
  }
</script>
<body bgcolor="#ffffff">
  <table height="100%" width="100%" cellspacing="0" cellpadding="0">
    <tr>
      <td colspan="5" height="52"> <tiles:insert page="tiles/header.jsp"/></td>
    </tr>
    <tr>
      <td colspan="5" height="30"> <tiles:insert page="tiles/menu.jsp"/></td>
    </tr>
    <tr>
      <td height="100%" align="center" valign="top">
	  	<br>
        <table  width="450" border="0" cellpadding="0" cellspacing="1" class="tabla">
          <tr>
            <td class="encabezadoTabla" align="center" colspan="6">
              <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="32" align="center"><img src="images/img_loginFlecha.gif" width="17" height="23" alt=""></td>
                    <td width="201" class="font_general"><strong>Listado de Grupos</strong></td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td width="50" height="20" align="center" class="font_general encabezado_col"><a href="javascript:var win=open('<html:rewrite page="/grupoAction.do?action=editarGrupo"/>', 'Editar','width=300,status=YES,height=150,scrollbars=NO')"><img src="images/img_agregar.gif" height="15" width="15" alt="Grupo Nuevo" border="0"></a></td>
              <td align="center" class="font_general encabezado_col">Descripcion</td>
              <td align="center" class="font_general encabezado_col">Linea</td>
              <td width="50" class="font_general encabezado_col">&nbsp;</td>
              <td width="50" class="font_general encabezado_col">&nbsp;</td>
            </tr>
            <logic:present name="arr_grupo">
              <logic:iterate name="arr_grupo" id="grupo" scope="request">
                <bean:define id="bool_row" name="grupo" property="bool_fila"></bean:define>
                <bean:define id="int_del" name="grupo" property="int_eliminar"></bean:define>
                <tr>
                  <td align="center" class="font_general <logic:equal name="bool_row" value="false">im</logic:equal>par"><a href="javascript:var win=open('<html:rewrite page="/grupoAction.do" name="grupo" property="map_urlActualizar"/>', 'Editar','width=300,status=YES,height=150,scrollbars=NO')"><img src="images/img_editar.gif" height="15" width="15" border="0" alt="Editar Grupo"></a></td>
                  <td align="center" class="font_general <logic:equal name="bool_row" value="false">im</logic:equal>par"><bean:write name="grupo" property="str_descGrupo"/></td>
                  <td align="center" class="font_general <logic:equal name="bool_row" value="false">im</logic:equal>par"><bean:write name="grupo" property="str_lineaGrupo"/></td>
                  <td align="center" class="font_general <logic:equal name="bool_row" value="false">im</logic:equal>par"><a href="javascript:var win=open('<html:rewrite page="/grupoProd.do" name="grupo" property="map_urlProducto"/>', 'Editar','width=350,status=YES,height=203,scrollbars=YES')"><img src="images/img_listado.gif" height="15" width="15" border="0" alt="Listado Producto"></a></td>
                  <td align="center" class="font_general <logic:equal name="bool_row" value="false">im</logic:equal>par">
                     <logic:equal name="int_del" value="0"><a href="javascript:var win=open('<html:rewrite page="/grupoAction.do" name="grupo" property="map_urlEliminar" />', 'Editar','width=50,status=YES,height=50,scrollbars=NO')" onclick="return eliminarGrupo(0);"><img src="images/img_borrar.gif" height="15" width="15" align="absmiddle" border="0" alt="Eliminar Grupo"></a></logic:equal>
                     <logic:equal name="int_del" value="1"><a href="javascript:var win=open('<html:rewrite page="/grupoAction.do" name="grupo" property="map_urlEliminar" />', 'Editar','width=50,status=YES,height=50,scrollbars=NO')" onclick="return eliminarGrupo(1);"><img src="images/img_borrar.gif" height="15" width="15" align="absmiddle" border="0" alt="Eliminar Grupo"></a></logic:equal>
                  </td>
                </tr>
              </logic:iterate>
            </logic:present>
            <logic:notPresent name="arr_grupo">
              <tr>
                <td colspan="5" align="center" class="encabezado_col">No se encontraron registros</td>
              </tr>
            </logic:notPresent>
          </tr>
        </table>
      </td><tr>
        <td colspan="5"><tiles:insert page="tiles/footer.jsp"/></td>
      </tr>
    </table>
  </body>
</html>
